//
//  TEPlayerManager.m
//  XYSfxyxuSwift
//
//  Created by 许洋 on 2018/4/9.
//  Copyright © 2018年 许洋. All rights reserved.
//

#import "TEPlayerManager.h"
@interface TEPlayerManager()

@end
static ZFPlayerView *_playerView;

@implementation TEPlayerManager
static TEPlayerManager *_manager = nil;
+ (TEPlayerManager *)standardManager{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _manager = [[self alloc]init];
    });
    return _manager;
}
//- (instancetype)init
//{
//    if (_manager) {
//        return _manager;
//    }
//    self = [super init];
//    if (self) {
//        [self playerView];
//    }
//    return self;
//}
//- (ZFPlayerView *)playerView{
//    if (!_playerView) {
//        _playerView = [[ZFPlayerView alloc]init];
//        _playerView.hasPreviewView = YES;
//        _playerView.playerLayerGravity = ZFPlayerLayerGravityResizeAspect;
//    }
//    return _playerView;
//}
//

+ (void)playerModel:(ZFPlayerModel *)playerModel{
    [_playerView playerModel:playerModel];
}
+ (ZFPlayerView *)createPlayerView{
    ZFPlayerView *playerView = [[ZFPlayerView alloc]init];
    playerView.hasPreviewView = YES;
    playerView.playerLayerGravity = ZFPlayerLayerGravityResizeAspect;
    _playerView = playerView;
    return playerView;
}

@end
